package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bean.UserBean;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface IUserMapper extends BaseMapper<UserBean> {
    public UserBean findById(int id);


    public  void  addRoleList(@Param("userId") int userId, @Param("roleArray") int []roleArray);

    @Delete("delete from t_user_role where fk_userId=#{id};" +
            "delete from t_userX where pk_userId=#{id}")
    public  void  del(int id);

    public  void  update(@Param("id") int id,@Param("roleArray") int[] roleArray);
}
